package top.tangyh.lamp.care.vo.save;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import lombok.Data;
import top.tangyh.lamp.care.entity.BPgSrxDetailNormal;

import java.math.BigDecimal;

@Data
@Schema(description ="普通输入项明细")
public class SrxDetailNormalVO {

    //    @NotNull(message = "请输入明细id", groups = {BaseEntity.Update.class})
    private Long id;

    @Schema(description = "评估评分id")
//    @NotNull(message = "请输入评估评分id")
    private Long pgId;

    @Schema(description = "输入项id")
//    @NotNull(message = "请输入 输入项id")
    private Long pgSrxId;

    @Schema(description = "明细类型")
    @NotBlank(message = "请输入明细类型")
    private String detailTypeCode;

//    @Schema(description ="是否自定义")
//    @NotNull(message = "请输入是否自定义")
//    private Integer isDiy;

    @Schema(description = "内容")
    @NotBlank(message = "请输入内容")
    private String detailContent;

    @Schema(description = "分数")
//    @NotNull(message = "请输入内容")
    private BigDecimal score;

    @Schema(description = "缩写")
    @NotBlank(message = "请输入缩写")
    private String shortName;

    @Schema(description = "区间开始值")
    private BigDecimal rangeStart;

    @Schema(description = "区间结束值")
    private BigDecimal rangeEnd;

    @Schema(description = "描述")
    private String descs;

    @Schema(description = "排序")
    private String orders;

    public SrxDetailNormalVO(BPgSrxDetailNormal normalPO) {
        this.id = normalPO.getId();
        this.pgId = normalPO.getPgId();
        this.pgSrxId = normalPO.getPgSrxId();
        this.detailTypeCode = normalPO.getDetailTypeCode();
//        this.isDiy = normalPO.getIsDiy();
        this.detailContent = normalPO.getDetailContent();
        this.score = normalPO.getScore();
        this.shortName = normalPO.getShortName();
        this.rangeStart = normalPO.getRangeStart();
        this.rangeEnd = normalPO.getRangeEnd();
        this.descs = normalPO.getDescs();
        this.orders = normalPO.getOrders();
    }

    public SrxDetailNormalVO() {
    }
}